<template>
	<view style="padding: 0 20rpx;background: #f1f1f1;min-height: 100vh;">
		<block v-if="list.length>=1">
			<view class="" style="padding: 30rpx 25rpx;background: #ffffff;font-size: 26rpx;margin-bottom: 20rpx;"v-for="(item,index) in list" :key="index">
				<view style="display: flex;justify-content: space-between;border-bottom: 1rpx solid #eeeeee;padding-bottom: 20rpx;">
					<view class="" style="font-size: 26rpx;">{{ item.withdraw_type_text }}</view>
					<view class="" style="color: #faad14;">{{ item.amount }}元</view>
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 10rpx;">
					<view>申请状态</view>
					<view style="color: #faad14">{{ item.status_text }}</view>
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 10rpx;">
					<view class="">账户信息</view>
					<view style="color: #c0c0c0;" v-if="item.withdraw_type==='wechat'">微信零钱</view>
					<view style="color: #c0c0c0;" v-if="item.withdraw_type==='alipay'">支付宝[{{item.withdraw_info_hidden['支付宝账户']}}]</view>
					<view style="color: #c0c0c0;" v-if="item.withdraw_type==='bank'">{{item.withdraw_info_hidden['开户行']}}[{{item.withdraw_info_hidden['银行卡号']}}]</view>
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 10rpx;">
					<view class="">提现单号</view>
					<view class="" style="color: #c0c0c0;">{{item.withdraw_sn}}</view>
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 10rpx;">
					<view class="">手续费</view>
					<view class="" style="color: #c0c0c0;">{{item.charge_fee}}元</view>
				</view>
				<view class="" style="display: flex;justify-content: space-between;margin-top: 10rpx;">
					<view class="">申请时间</view>
					<view class="" style="color: #c0c0c0;">{{item.createtime}}</view>
				</view>
			</view>
		</block>
		<view class="" v-else style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);">
			 <tn-empty mode="order"></tn-empty>
		</view>
	</view>
</template>

<script>
	import {
		getShopWithdrawListRow
	} from '@/apis/index.js'
	export default {
		data() {
			return {
				list_rows: 6,
				page: 1,
				list: [],
				last_page: ''
			}
		},
		onLoad() {
			this.getDataList()
		},
		onReachBottom() {
			if (this.page >= this.last_page) {
				return
			} else {
				this.page++
				this.getDataList()
			}
		},
		methods: {
			async getDataList() {
				let res = await getShopWithdrawListRow(this.list_rows, this.page)
				this.list = [...this.list, ...res.data.data]
				this.last_page = res.data.last_page
			}
		}
	}
</script>

<style>

</style>